﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.TreeView, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.ScrollForm, "ScriptType"))

	_DB:AddCodeHelp("OnNodeSelected", [[ScriptType, Run when an treenode in the treeview is selected]], [[OnNodeSelected(...)]])
	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.TreeView, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.ScrollForm, "Function"))

	_DB:AddCodeHelp("RemoveNodeByValue", [=[Removes a Treenode from the TreeView by value]=], [=[RemoveNodeByValue(value1, value2, ...)]=])
	_DB:AddCodeHelp("GetSelectNode", [=[Gets the selected TreeNode of the TreeView]=], [=[GetSelectNode()]=])
	_DB:AddCodeHelp("SelectNodeByValue", [=[Selects a Treenode from the TreeView by value]=], [=[SelectNodeByValue(value1, value2, ...)]=])
	_DB:AddCodeHelp("SetTree", [=[ReBudild the treeView with a data table]=], [=[SetTree(treeTable)]=])
	_DB:AddCodeHelp("GetNodeByValue", [=[Gets a Treenode from the TreeView by value]=], [=[GetNodeByValue(value1, value2, ...]=])
	_DB:AddCodeHelp("AddNode", [=[Adds child-nodes by the given information]=], [=[AddNode(nodeTable)]=])
	_DB:AddCodeHelp("Dispose", [=[Dispose, release resource]=], [=[Dispose()]=])
	_DB:AddCodeHelp("RemoveNode", [=[Removes a child-node by index]=], [=[RemoveNode(index)]=])
	_DB:AddCodeHelp("GetNode", [=[Gets a child-node by index]=], [=[GetNode(index)]=])
	_DB:AddCodeHelp("GetValue", [=[Gets the selected TreeNode's value]=], [=[GetValue()]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.TreeView, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.ScrollForm, "Property"))

	_DB:AddCodeHelp("ChildNodeNum", [[the child-node's count, readonly]], IGAS:GetPropertyType("number"))
end
